﻿
<form action="">

    <input type="text" id="userInput" />

    <button id="submit" type="submit">ok</button>

</form>


@section scripts
{
    <script type="text/javascript">
        $(function () {

            $('#submit').on('click', function (e) {
                e.preventDefault();
                $.post('/api/trigger', {value:$('#userInput').val()}).then(function (data) {
                }, function (err) {
                    console.log(err.message);
                });
            });

        });
    </script>
}
